Marks this thing as done in the world: the world remembers it for good. A chest that has been opened, a gate that has been unlocked. It only does something for a thing placed in a world with "Remembered in the world" turned on. world_remember(false) takes the mark off again.
world_remember(on = true)| Name | Type |
|---|---|
on | bool (can be left out; then it is true) |
Nothing.
Tells the world to remember this thing as done: a chest that has been opened, a gate that has been unlocked, a lever that has been pulled. The world keeps the mark for good, so when the player walks far away and comes back (or saves, switches the game off and plays again) the thing is still done.
It only does something for a thing you placed in a world with Remembered in the world turned on. For any other instance (one your code made, or one placed without that box ticked) it does nothing.
world_remember(false) takes the mark off again, for a thing that can be undone (a door that can be locked again).
You do not need this call for a thing that simply goes away. Destroying a Remembered thing marks it done by itself, so a coin that is picked up with instance_destroy stays picked up. This call is for things that stay in the world and change.
What the world does with the mark when it makes the thing again:
world_remembered is not made again once it is done. That is what you want for a pickup or an enemy.world_remembered is always made again, and it asks for itself in its Create event, so it can show itself open, unlocked or pulled.The marks are saved with the game when you call save_commit, and a new game (save_clear) forgets them all.
if (opened == 0 && dist_to(x, y, other_x, other_y) < 12) {
opened = 1;
world_remember();
}The chest opens when the player is close, and the world remembers it.
The world keeps one bit for each Remembered thing, and the bits are saved with the game (save_commit) and given up by save_clear. Destroying a Remembered thing marks it too, without calling this. What the world does with the mark when the part of the world holding the thing is made again: a thing whose code never asks world_remembered() is simply not made again once it is marked, so a pickup that was taken stays taken; a thing whose code asks world_remembered() is always made again, and asks for itself, so a chest can show itself open. Does nothing for a thing that is not a Remembered thing of a world (one made by code, say).